<?php


namespace app\common\model;
use think\facade\Db;

class Goods extends Base
{
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = true;
    // 定义时间戳字段名
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';

    public function searchGoodsNameAttr($query, $value, $data)
    {
        //p($value);die;
        $query->where('goods_name','like', $value . '%');
    }


}